#pragma once
#include "Loadfile.h"
#include "Directx.h"
Loadfile::Loadfile(void){}

Loadfile::~Loadfile(void){}

vector<string> readfiletxt(char *path)
{
	vector<string> list;

	string word;
	ifstream wordfile(path);
	if(!wordfile.is_open())
	{
		MessageBoxW(0,L"Khong mo duoc file", L"OK", MB_OK);
	}
	while (wordfile.good()) 
	{
		wordfile >> word;
		list.push_back(word);
	}
	wordfile.close();
	return list;
}
std::wstring s2ws(const std::string& s)
{
	int len;
	int slength = (int)s.length() + 1;
	len = MultiByteToWideChar(CP_ACP, 0, s.c_str(), slength, 0, 0); 
	wchar_t* buf = new wchar_t[len];
	MultiByteToWideChar(CP_ACP, 0, s.c_str(), slength, buf, len);
	std::wstring r(buf);
	delete[] buf;
	return r;
}